package de.uni_mannheim.informatik.ai.dame_ai.dame.domain;

public class Move {
	protected int selectedPosition;
	protected int killPosition;
	protected int targetPosition;
	protected boolean isJump=false;
	public Move(int fromPos, int toPos) {
		super();
		this.selectedPosition = fromPos;
		this.targetPosition = toPos;
		
	}
	public int getKillPosition() {
		return killPosition;
	}
	public void setKillPosition(int killPosition) {
		this.killPosition = killPosition;
	}
	/**
	 * Creates Move with given parameters
	 * @param selectedPosition
	 * @param targetPosition
	 * @param isJump
	 */
	public Move(int selectedPosition, int targetPosition,boolean isJump){
		super();
		this.selectedPosition = selectedPosition;
		this.targetPosition = targetPosition;
		this.isJump = isJump;
	}
	public Move(int fromPos) {
		super();
		this.selectedPosition = fromPos;
	}
	public Move() {
	}
	public int getFromPos() {
		return selectedPosition;
	}
	public void setFromPos(int fromPos) {
		this.selectedPosition = fromPos;
	}
	public int getToPos() {
		return targetPosition;
	}
	public void setToPos(int toPos) {
		this.targetPosition = toPos;
	}
	
	public boolean isJump() {
		return isJump;
	}
	public void setJump(boolean isJump) {
		this.isJump = isJump;
	}
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof Move){
			Move temp = (Move)obj;
			if(temp.targetPosition==this.targetPosition && temp.selectedPosition == this.selectedPosition){
				return true;
			} else return false;
		} else return false;
	}

	
}
